<link rel="stylesheet" href="css/sidebar.css">
<!-- <script src="js/settings_content.js"></script>-->
<%@ page import="servlets.message.*"%>
<%@ page import="org.hibernate.SessionFactory"%>
<%@ page import="org.hibernate.Session"%>
<%@ page import="java.util.List"%>
<%@ page import="hibernate.model.*"%>
<%@ page import="hibernate.util.HibernateUtil"%>
<%@ page import="hibernate.method.*"%>
<%@ page import="hibernate.method.UserMethods"%>

<div class="settings">

<div style="text-align:center">
<div class="title">
<h3>USTAWIENIA</h3>
</div>
</div>
	<%
Integer user_id = (Integer) session.getAttribute("user_id");
response.setContentType("text/html");
SessionFactory sessionFactory = HibernateUtil.getSessionAnnotationFactory();
Session s= sessionFactory.openSession();
s.beginTransaction();
UserMethods um = new UserMethods();
if (user_id == null) {
%>
<div id="settings_content">Aby wyswietlic ustawienia musisz byc zalogowany</div>
		<% } 
else
	if ("client".equals(um.getUserType(sessionFactory, s, user_id))){

	%>
<div class="menu_simple">
<ul>
<li><a class="edit" href="../social/index.jsp?page=settings&group=edit">EDYCJA DANYCH</a></li>
<li> <a class="others" href="../social/index.jsp?page=settings&group=others">INNE</a> </li>
</ul>
</div>

<div id="settings_content">
<jsp:include page="settings/settings_content.jsp"></jsp:include>
</div>


<%
s.getTransaction().commit();
}
%>
</div>


